package com.cybertooth.dbconvenience.query.enums;

import com.cybertooth.dbconvenience.query.core.SqlTransformer;

/**
 * <p></p>
 *
 * @author dnelson
 */
public enum SortDirection implements SqlTransformer {
	ASC("ASC"),
	DESC("DESC"),;

	// -----------------------------------------------------------------------Fields

	private String sqlRepresentation;

	// -----------------------------------------------------------------Constructors

	SortDirection(String sqlRepresentation) {
		this.sqlRepresentation = sqlRepresentation;
	}

	// ---------------------------------------------------------------Public Methods

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toSql() {
		return new StringBuilder().append(" ").append(this.sqlRepresentation).append(" ").toString();
	}
}
